package DEEPERsource.DEEPERsource.source.corpus;

import java.util.Iterator;

public class CorpusPrinter {
	
	public String printInARFF(Text text){
		TextPresentationBuilder builder = new TextPresentationBuilder();
		builder.init("arff");
		buildText(builder, text);
		return builder.getText();
	}
	
	private void buildText(TextPresentationBuilder builder, Text text){
		builder.addARFF(text);
		for(Iterator<Text> i = text.iterator(); i.hasNext();){
			Text piece = i.next();
			buildText(builder, piece);
		}
	}
	
}
